package com.example.boot.config;

import com.example.boot.bean.User;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.datatype.jsr310.deser.DurationDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.key.DurationKeyDeserializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Scope;

@Configuration
@Import(JavaTimeModule.class)
public class AppConfig {
    @Scope("prototype") //singleton 默认单实例  prototype 多实例
    @Bean("userhaha")
    public User User(){
        return new User(100,"姬少帅");
    }

   /* @Bean
    public JavaTimeModule javaTimeModule(){
        return new JavaTimeModule();
    }*/
}
